// 欢迎插件

string author = "Live";
string pluginName = "Welcome 欢迎";
string version = "1.0";

// 当插件被初始化
void OnPluginInit()
{
        // 设置插件信息
        PluginData::SetAuthor(author);
        PluginData::SetName(pluginName);
        PluginData::SetVersion(version);

        // 提示
        ThePresident.InfoFeed("插件:"+pluginName+"| 版本:"+version+"| 作者:"+author,false);
        
        // 当玩家连接后
        Events::Player::OnPlayerConnected.Hook( @OnPlayerConnected );

}

// 当玩家连接后
HookReturnCode OnPlayerConnected(CTerrorPlayer@ pPlayer)
{
        // 欢迎玩家
        Chat.PrintToChat(all,"Server.{gold}[{green}Live{gold}]{white}:Welcome to my server{green}["+pPlayer.GetPlayerName()+"]{white}，the server mode is pure original (resurrected 30 seconds after death).");
        Chat.PrintToChat(all,"服务器.{gold}[{green}Live{gold}]{white}:欢迎你{green}["+pPlayer.GetPlayerName()+"]{white}来到我的服务器，目前服务器模式为纯净原版(死亡后30秒复活)。欢迎进群交流：392635015");
        Chat.PrintToChat(all,"!m调出菜单，!k自杀(!m menu,!k idioctonia)");
        // 控制台输出测试信息
        Chat.PrintToConsole(all,"[Live]插件测试信息:"+pPlayer.GetPlayerName()+" 加入游戏");
        Chat.PrintToConsole(all,"[Live]插件测试信息:"+pPlayer.GetPlayerName()+"的entindex是:"+pPlayer.entindex());

        return HOOK_CONTINUE;
}